//
//@File    :	7.2_protos.cpp
//@Time    :	2021/08/09 17:04:15
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	using prototypes and function calls
//

#include <iostream>
void cheers(int);
double cube(double x);
using namespace std;
int main()
{
    cheers(5);
    cout<<"Give me a number: ";
    double side;
    cin>>side;
    double volume = cube(side);
    cout<<"A "<<side<<"-foot cube has a volume of ";
    cout<<volume<<" cubic feet.\n";
    cheers(cube(2));
    system("pause");
    return 0;
}
void cheers(int n)
{
    for (int i = 0; i < n; i++)
    {
        cout<<"Cheers! ";
    }
    cout<<endl;
}
double cube(double x)
{
    return x*x*x;
}